import request from '@/utils/request'

/**
* 总成大类下拉查询
* @param {查询条件} data
*/
export function listAllproductCatalog(query) {
  return request({
    url: '/set/productCatalog/interface',
    method: 'get',
    params: query,
  })
}
/**
* 总成大类分页查询
* @param {查询条件} data
*/
export function listproductCatalog(query) {
  return request({
    url: '/set/productCatalog/list',
    method: 'get',
    params: query,
  })
}

/**
* 新增总成大类
* @param data
*/
export function addproductCatalog(data) {
  return request({
    url: '/set/productCatalog',
    method: 'post',
    data: data,
  })
}

/**
* 修改总成大类
* @param data
*/
export function updateproductCatalog(data) {
  return request({
    url: '/set/productCatalog',
    method: 'PUT',
    data: data,
  })
}

/**
* 获取总成大类详情
* @param {Id}
*/
export function getproductCatalog(id) {
  return request({
    url: '/set/productCatalog/' + id,
    method: 'get'
  })
}

/**
* 删除总成大类
* @param {主键} pid
*/
export function delproductCatalog(pid) {
  return request({
    url: '/set/productCatalog/' + pid,
    method: 'delete'
  })
}

// 导出总成大类
export function exportproductCatalog(query) {
  return request({
    url: '/set/productCatalog/export',
    method: 'get',
    params: query
  })
}
// 下载模板
export function importTemplate() {
  return request({
    url: '/set/productCatalog/importTemplate',
    method: 'get',
  })
}